package com.jymj.enumEntity;

/**
 * Created by ljj on 2018/11/23.
 */
public enum ProjDeclareEnum {
    two("农用地整理项目", 1),
    nine("高标准农田建设项目", 2),
    three("土地开发项目", 3),
    four("土地复垦项目", 4),
    five("工矿废弃地复垦项目", 5),
    six("城乡建设用地增减挂项目", 6),
    seven("土地综合整治项目", 7),
    eight("其他", 0),;
    // 成员变量
    private String name;
    private int index;

    // 构造方法
    private ProjDeclareEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }

    // 普通方法
    public static String getName(int index) {
        for (ProjDeclareEnum s : ProjDeclareEnum.values()) {
            if (s.getIndex() == index) {
                return s.name;
            }
        }
        return null;
    }

    // get set方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
